//  专门请求接口
const baseURL = "http://localhost:3000";
export function get(url) {
    return fetch(baseURL + url, { method: "GET" }).then((res) => res.json());
}
export function post(url, params) {
    return fetch(baseURL + url, {
        method: "POST",
        mode: "cors",
        headers: {
            "Content-Type": "application/json",
        },
        body: JSON.stringify(params),
    }).then((res) => res.json());
}
export default {
    get,
    post,
};
